#ifndef DATAPARAMWIDGET_H
#define DATAPARAMWIDGET_H

#include <QWidget>
#include <QLineEdit>
#include <QLabel>
#include <QMessageBox>
#include <QGridLayout>
#include <QPushButton>
#include <QDoubleValidator>
#include "quiqss.h"
#include "cmddefine.h"

class QDataParamWidget : public QWidget
{
    Q_OBJECT
public:
    explicit QDataParamWidget(QString sName,int nCmdIndex,QStringList sParamNamelist,QWidget *parent = nullptr);

signals:
    void signal_set_data_value(int nCmdItemId,QByteArray data,int nItemByteNum);

public slots:

    void onSendData();


public:

    bool setParamData(QList<float> pValueList);

    bool saveParamData();


private:

    void InitUI();

    QStringList _sParamNamelist;
    QString _sCmdName;
    QList<QLineEdit*>_pValueEditList;
    QList<float> _pValueList;


    QPushButton* _pSendDataBtn;

    int _nCmdIndex;


};

#endif // DATAPARAMWIDGET_H
